package tp.pr5.commands;

import tp.pr5.Game;
import tp.pr5.Map;
import tp.pr5.MensajesConst;
import tp.pr5.Player;
import tp.pr5.Room;
import tp.pr5.commands.exceptions.CommandExecutionException;
import tp.pr5.commands.exceptions.WrongCommandFormatException;

@SuppressWarnings("unused") public class ExamineCommand implements Command
{

	private Player _friki;
	private Room _habitacion;
	private Game _game;
	private Map _map;

	public ExamineCommand()
	{
		this._friki = null;
		this._habitacion = null;
	}

	@Override public void execute() throws CommandExecutionException
	{

		this._map.playerExamineRoom();
		

	}

	@Override public String getHelp()
	{
		return MensajesConst.hExamine;
	}
	public void configureContext(Game g, Map m, Player p) {
		this._friki=p;
		this._habitacion=m.getCurrentRoom();
		this._game=g;
		this._map=m;
	}
	@Override public Command parse(String cad)
			throws WrongCommandFormatException
	{

		if (cad.lastIndexOf(' ') != -1)
			throw new WrongCommandFormatException();

		else if (cad.equalsIgnoreCase("EXAMINE")
				|| cad.equalsIgnoreCase("EXAMINAR"))
		{
		//	this._friki = execContext.getPlayer();
			//this._habitacion = execContext.getCurrentRoom();
		//	this._map.playerExamineRoom();
			return this;
		}
		throw new WrongCommandFormatException();

	}



	

}
